/****************************************************
 *  Copyright © 2023-2030 CaiTao. All rights reserved.
 *------------------------------------------------------------------------
 *  文件：TouchInteractableObj.cs
 *  作者：CT
 *  日期：Created by Fxb on 2023/6/5 15:58:15
 *  项目：混合动力发动机试验系统
 *  功能：Nothing
*****************************************************/

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TouchInputManager
{
    public class TouchInteractableObj : MonoBehaviour, ITouchInteractable
    {
        public bool IsInteractable { get; set; } = true;
        public bool enableDoubleFocusSet;

        public bool enableLongPressFocusSet;

        public event Action<RaycastHit> OnInteractFocusSet;
        public event Action<RaycastHit> OnInteractDoubleFocusSet;
        public event Action<RaycastHit> OnInteractLongPressFocusSet;
        public virtual void InteractDoubleFocusSet(RaycastHit hit)
        {
            OnInteractDoubleFocusSet?.Invoke(hit);
        }

        public virtual void InteractFocusSet(RaycastHit hit)
        {
            OnInteractFocusSet?.Invoke(hit);
        }

        public virtual void InteractLongPressFocusSet(RaycastHit hit)
        {
            OnInteractLongPressFocusSet?.Invoke(hit);
        }
    }
}

